<?php
$databaseFile = 'database_tom.db'; // SQLite数据库文件路径
 
try {
    // 连接到SQLite数据库
    $pdo = new PDO('sqlite:' . $databaseFile);
 
    // 查询数据表信息
    $stmt = $pdo->query('SELECT name FROM table_tom WHERE id> 0  ORDER BY id');
    
    // 输出数据表名
    while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
        echo $row['name'] . "\n";
    }
} catch (PDOException $e) {
    echo "数据库连接失败: " . $e->getMessage();
}
?>